﻿using OneByOne.API;
using System.Diagnostics.CodeAnalysis;

namespace OneByOne
{
    internal sealed class Enemy : IEnemy
    {
        public string? Name { get; set; }

        public int Strength { get; set; }

        public int Reward { get; set; }

        private readonly Dictionary<string, object> tags = new Dictionary<string, object>();

        public void SetTag(Guid pluginGuid, string key, object value)
        {
            this.tags[$"{pluginGuid}-{key}"] = value;
        }

        public bool TryGetTag(Guid pluginGuid, string key, [NotNullWhen(true)] out object? value)
        {
            return this.tags.TryGetValue($"{pluginGuid}-{key}", out value);
        }
    }
}
